import request from '@/utils/requests.js'

export function listWithId(id, num) {
  return request({
    url: `/leaveMsg/list/${id}/${num}`,
    method: 'get'
  })
}

export function list(num) {
  return request({
    url: `/leaveMsg/list/${num}`,
    method: 'get'
  })
}

export function listAll() {
  return request({
    url: `/leaveMsg/list`,
    method: 'get'
  })
}

export function deleteOne(id) {
  return request({
    url: `/leaveMsg/delete/${id}`,
    method: 'delete'
  })
}

export function insertOne(msg) {
  return request({
    url: `/leaveMsg/insert`,
    method: 'post',
    data: msg
  })
}
